package com.shangxian.giveithome.code;

public enum AuthCode implements Code {
    CODE_NOT(true, 204, "需要Code"),
    OPEN_ID_ERROR(false, 500, "获取OpenId异常"),
    PHONE_ERROR(false, 206, "手机号码获取失败,请重试"),
    ACCESS_TOKEN_ERROR(false, 207, "access_token获取异常"),;
    private boolean success;

    private Integer code;

    private String message;

    AuthCode(boolean success, Integer code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }

    @Override
    public boolean success() {
        return this.success;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String message() {
        return this.message;
    }
}
